Skip to content

feat(blog): add code block component [INTORG-767]#328

Merged
JonathanMatthey merged 16 commits into
stagingfrom
jm/intorg-767-code-block
Jun 30, 2026
Merged

feat(blog): add code block component [INTORG-767]#328
JonathanMatthey merged 16 commits into
stagingfrom
jm/intorg-767-code-block

Conversation

@JonathanMatthey

@JonathanMatthey JonathanMatthey commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a code block component for blog posts, syntax highlighting via Shiki, copy button, optional title, 14 supported languages. Covers the Strapi component schema, MDX serializer, and Astro render component.

Related Issue

Fixes INTORG-767

Manual Test

  1. Add a Code Block to a blog post in Strapi and run MDX sync
  2. Check syntax highlighting and the copy button work in the browser

Checks

  • pnpm run format
  • pnpm run lint

PR Checklist

  • PR title follows Conventional Commits (e.g. feat: ..., fix: ...)
  • Linked issue included
  • Scope is focused (target ~10-20 files when possible)
  • Screenshots for UI changes (if applicable)

@JonathanMatthey JonathanMatthey self-assigned this Jun 4, 2026
@netlify

netlify Bot commented Jun 4, 2026

Copy link
Copy Markdown

Deploy Preview for interledger-org-v5 ready!

Name Link
🔨 Latest commit 5b33a1f
🔍 Latest deploy log https://app.netlify.com/projects/interledger-org-v5/deploys/6a4273ac6082db000881e666
😎 Deploy Preview https://deploy-preview-328--interledger-org-v5.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Infi-Knight Infi-Knight left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like there is no import handler for CodeBlock? i.e the export path works but the parser will hard-fail without a registered handler

@JonathanMatthey

Copy link
Copy Markdown
Collaborator Author

looks like there is no import handler for CodeBlock? i.e the export path works but the parser will hard-fail without a registered handler

very true - hadn't run the import

Comment thread src/components/blocks/CodeBlock.astro Outdated
Comment thread src/components/blocks/DynamicZone.astro
Comment thread cms/scripts/sync-mdx/codeBlockHandler.ts Outdated
Comment thread src/components/blocks/CodeBlock.astro
Comment thread src/components/blocks/CodeBlock.astro Outdated
Comment thread src/components/blocks/CodeBlock.astro Outdated
Comment thread src/components/blocks/CodeBlock.astro

@Anca2022 Anca2022 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments, but great job! 🚀 🎉

@JonathanMatthey JonathanMatthey merged commit f856d2e into staging Jun 30, 2026
7 checks passed
@JonathanMatthey JonathanMatthey deleted the jm/intorg-767-code-block branch June 30, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants